package com.zf.shuashua.ui.popup;

import android.app.Activity;
import android.content.Intent;

import androidx.annotation.NonNull;

import com.lxj.xpopup.core.CenterPopupView;
import com.zf.shuashua.R;
import com.zf.shuashua.api.Constants;
import com.zf.shuashua.api.Store;
import com.zf.shuashua.ui.gift.H5Activity;

public class QixiPopup extends CenterPopupView {
    private Activity context;

    public QixiPopup(@NonNull Activity context) {
        super(context);
        this.context = context;
    }

    @Override
    protected int getImplLayoutId() {
        return R.layout.popup_qixi;
    }

    @Override
    protected void onCreate() {
        super.onCreate();
        findViewById(R.id.img_backdrop).setOnClickListener(view -> {
            context.startActivity(new Intent(context, H5Activity.class).putExtra("money", Constants.H5_URL + "activity_qixi").putExtra("title", "七夕鹊桥会"));
            dismiss();
        });

        findViewById(R.id.btn_guafen).setOnClickListener(view -> {
            context.startActivity(new Intent(context, H5Activity.class).putExtra("money", Constants.H5_URL + "activity_qixi").putExtra("title", "七夕鹊桥会"));
            dismiss();
        });


        findViewById(R.id.img_close).setOnClickListener(view -> dismiss());

    }

}

